const db = require('./db.js')

exports.getLunbo = async () => {
    try {
        const sqlStr = `select id,img,url from cms_lunbo`
        return await db.query(sqlStr)
    } catch (err) {
        throw err
    }
}

exports.getNewsList = async () => {
    try {
        const sqlStr = `select id,img_url,title,zhaiyao,add_time,click from cms_news`
        return await db.query(sqlStr)
    } catch (err) {
        throw err
    }
}